package com.yang.limit.constant;

import com.yang.limit.service.RequestLimitService;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class Constant {
    /**
     * 服务集合
     * key 限流类型
     * value 具体的服务
     */
    public static final Map<RequestLimitType, RequestLimitService> REQUEST_LIMIT_SERVICE_MAP= new ConcurrentHashMap<>();

    /**
     * 令牌桶redis key前缀
     */
    public static final String REDIS_KEY_TOKEN_BUCKET_PREFIX = "request:limit:tokenbucket:";

    public static final String REDIS_KEY_LEAKY_BUCKET_PREFIX = "request:limit:leakybucket:";
}
